/*
 * @Description:头部组件
 * @Author: Zzt
 * @Date: 2022-10-27 09:07:09
 * @LastEditTime: 2022-10-28 14:30:36
 */
import { Button } from 'antd';
import classNames from 'classnames/bind';
import { useMemo, useState } from 'react';
import styles from '../styles/boxConfig.module.scss';
import Add from './dialogs/Add';
const cx = classNames.bind(styles);
const PageOperate = () => {
  const [addVisible, setAddVisible] = useState(false);
  return (
    <div>
      <b>盒规格配置</b>
      <Button className={cx('title-right')} onClick={() => setAddVisible(true)}>
        新建盒
      </Button>
      {useMemo(
        () => (
          <Add
            visible={addVisible}
            onClose={() => {
              setAddVisible(false);
            }}
          />
        ),
        [addVisible]
      )}
    </div>
  );
};
export default PageOperate;
